package com.shopreg.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

@Entity
@Table(name="SHOP_PHONE_NUMBERS")
public class PhoneNumbers {

	private int phoneNumberId;
	private String landLine1;
	private String landLine2;
	private String landLine3;
	private String landLine4;
	private String mobNumber;
	private ShopDetails shopDetails;
	
	@Id
	@GeneratedValue(generator="gen")
	@Column(name = "PHONE_NUMBER_ID")
	@GenericGenerator(name="gen", strategy="foreign", parameters=@Parameter(name="property", value="shopDetails"))
	public int getPhoneNumberId() {
		return phoneNumberId;
	}
	public void setPhoneNumberId(int phoneNumberId) {
		this.phoneNumberId = phoneNumberId;
	}
	@Column(name = "LAND_LINE_1")
	public String getLandLine1() {
		return landLine1;
	}
	public void setLandLine1(String landLine1) {
		this.landLine1 = landLine1;
	}
	@Column(name = "LAND_LINE_2")
	public String getLandLine2() {
		return landLine2;
	}
	public void setLandLine2(String landLine2) {
		this.landLine2 = landLine2;
	}
	@Column(name = "LAND_LINE_3")
	public String getLandLine3() {
		return landLine3;
	}
	public void setLandLine3(String landLine3) {
		this.landLine3 = landLine3;
	}
	@Column(name = "LAND_LINE_4")
	public String getLandLine4() {
		return landLine4;
	}
	public void setLandLine4(String landLine4) {
		this.landLine4 = landLine4;
	}
	@Column(name = "MOBILE_NO")
	public String getMobNumber() {
		return mobNumber;
	}
	public void setMobNumber(String mobNumber) {
		this.mobNumber = mobNumber;
	}
	@OneToOne(fetch=FetchType.EAGER)
	@PrimaryKeyJoinColumn
	public ShopDetails getShopDetails() {
		return shopDetails;
	}
	public void setShopDetails(ShopDetails shopDetails) {
		this.shopDetails = shopDetails;
	}
	
	
}
